<template>
	<view style="position: absolute;left: 0;top: 0;width: 100%;height: 100%" @click="share()">
		<!-- #ifndef H5 -->
		<button open-type="share"
		style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;
		opacity: 0;"></button>
		<!-- #endif -->
	</view>
</template>

<script>
	export default {
		name:"share",
		data() {
			return {
				
			};
		},methods:{
			share(){
				if(this.moxiConfig('appType')=='h5'){
				 uni.setClipboardData({
						data: window.location.href,
						success: () => {
						  this.msg('已复制当前链接')
						}
				  });
				}
			}
		}
	}
</script>

<style>

</style>